<template>
  <div>
    <section
      class="bannerclass"
      @click="tiaozhuan"
    >
      <img :src="List.banner.img">
    </section>
    <guess
      :guessList="List"
      v-on:jiaoyudetail="jiaoyudetail"
    ></guess>
  </div>
</template>

<script>
import guess from '@/components/index/guess'
export default {
  props: ['List'],
  created () {
    // console.log(this.List)
  },
  components: {
    guess
  },
  methods: {
    jiaoyudetail (item) {
      this.$emit('jiaoyudetail', item)
    },
    tiaozhuan () {
      if (window.__wxjs_is_wkwebview !== true) {
        this.$router.push({
          path: '/coursedetails',
          query: {
            curriculumId: this.List.banner.link.curriculum_id,
            title: this.List.banner.link.title
          }
        })
      } else {
        window.location.href = `/coursedetails?curriculumId=${this.list.banner.link.curriculum_id}&title=${this.List.banner.link.title}`
      }
      // this.list.img
    }
  },
  data () {
    return {

    }
  }
}
</script>

<style lang="less" scoped>
.bannerclass {
  width: calc(100vw * 686 / 750);
  margin: calc(100vw * 60 / 750) auto;
  height: calc(100vw * 204 / 750);
  img {
    width: 100%;
    height: 100%;
  }
}
</style>
